package org.mspring.mlog.api.duoshuo.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

/**
 * 将评论同步到多说时，所用到的评论对象
 * 
 * @author Gao Youbo
 * @since 2013年9月23日
 */
public class DSComment implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 4320773383057681486L;
    private String post_key;
    private String thread_key;
    private String message;

    private String post_id;
    private String parent_key;
    private String author_key;
    private String author_name;
    private String author_email;
    private String author_url;
    private String ip;
    private String agent;
    private String likes;
    private String reports;
    private String created_at;
    private String status;

    public String getPost_key() {
        return post_key;
    }

    public void setPost_key(String post_key) {
        this.post_key = post_key;
    }

    public String getThread_key() {
        return thread_key;
    }

    public void setThread_key(String thread_key) {
        this.thread_key = thread_key;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getPost_id() {
        return post_id;
    }

    public void setPost_id(String post_id) {
        this.post_id = post_id;
    }

    public String getParent_key() {
        return parent_key;
    }

    public void setParent_key(String parent_key) {
        this.parent_key = parent_key;
    }

    public String getAuthor_key() {
        return author_key;
    }

    public void setAuthor_key(String author_key) {
        this.author_key = author_key;
    }

    public String getAuthor_name() {
        return author_name;
    }

    public void setAuthor_name(String author_name) {
        this.author_name = author_name;
    }

    public String getAuthor_email() {
        return author_email;
    }

    public void setAuthor_email(String author_email) {
        this.author_email = author_email;
    }

    public String getAuthor_url() {
        return author_url;
    }

    public void setAuthor_url(String author_url) {
        this.author_url = author_url;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    public String getLikes() {
        return likes;
    }

    public void setLikes(String likes) {
        this.likes = likes;
    }

    public String getReports() {
        return reports;
    }

    public void setReports(String reports) {
        this.reports = reports;
    }

    public String getCreated_at() {
        return created_at;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public static class Status {
        public static final String APPROVED = "approved";
        public static final String PENDING = "pending";
        public static final String DELETED = "deleted";
    }

    public List<NameValuePair> getArrayNameValuePairs() {
        List<NameValuePair> nvps = new ArrayList<NameValuePair>();
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][post_key]", this.post_key));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][thread_key]", this.thread_key));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][message]", this.message));

        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][post_id]", this.post_id));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][parent_key]", this.parent_key));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][author_key]", this.author_key));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][author_name]", this.author_name));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][author_email]", this.author_email));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][author_url]", this.author_url));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][ip]", this.ip));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][agent]", this.agent));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][likes]", this.likes));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][reports]", this.reports));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][created_at]", this.created_at));
        nvps.add(new BasicNameValuePair("posts[" + this.post_key + "][status]", this.status));
        return nvps;
    }
}
